@extends('layouts.app')

@section('content')
<div class="container">
    <div class="row">
    	<!--<div class="col-md-8 col-md-offset-2 ">-->
			<!-- Nav tabs -->
			<!--<ul class="nav nav-tabs agent-flex" role="tablist">
			  <li role="presentation" class="active"><a href="#home" role="tab" data-toggle="tab">一级(1)</a></li>
			  <li role="presentation"><a href="#profile" role="tab" data-toggle="tab">二级(1)</a></li>
			  <li role="presentation"><a href="#messages" role="tab" data-toggle="tab">三级(1)</a></li>
			</ul>-->
			
			<!-- Tab panes -->
			<!--<div class="tab-content">-->
			  <!--一级-->
			  <!--<div role="tabpanel" class="tab-pane active" id="home">-->
			  		<div class="col-md-8 col-md-offset-2 ">
			  			@if(!empty($commissions))
			  			@foreach($commissions as $c)
				  		<div class="panel panel-default">

			                <div class="panel-heading">{{ $c->order_user->name }} <span class="right">{{ $c->status() }}</span></div>
			                <div class="panel-body">
			                   <ul class="list-group" style="margin-bottom: 0;">
								  <li class="list-group-item clearfix">
								  	<span class="left">佣金收入</span>
								  	<span class="right">{{ $c->commission }}元</span>
								  </li>
								  <li class="list-group-item clearfix">
								  	<span class="left">订单金额</span>
								  	<span class="right">{{ $c->amount }}元</span>
								  </li>
								  <li class="list-group-item clearfix">
								  	<span class="left">提成级别</span>
								  	<span class="right">{{ $c->commission_user_level }}级</span>
								  </li>
								  <li class="list-group-item clearfix">
								  	<span class="left">订单编号</span>
								  	<span class="right">{{ $c->orderno }}</span>
								  </li>
								  <li class="list-group-item clearfix">
								  	<span class="left">创建时间</span>
								  	<span class="right">{{ $c->created_at }}</span>
								  </li>
								</ul> 
			                </div>
			            </div>
			            @endforeach
			            @else
			            <div class="panel panel-default">
			            	<div class="panel-heading">提示</div>
			            	<div class="panel-body">您没有佣金数据</div>
			            </div>
			            @endif
		            </div>

			  <!--</div>-->
			   <!--二级-->
			  <!--<div role="tabpanel" class="tab-pane" id="profile">..Profile</div>-->
			   <!--三级-->
			  <!--<div role="tabpanel" class="tab-pane" id="messages">.Messages.</div>-->
			<!--</div>-->
    	<!--</div>-->
    </div>
     {!! $commissions->render() !!}
</div>
@endsection
